﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JigLibX.Physics;
using PloobsEngine.Physics.XJigLib;

namespace PloobsEngine.Behaviors
{
    public class IsCollidingAction: IAction    
    {
         private Body body;


         public IsCollidingAction(JigLibXObject obj)
         {
             body = obj.Body_;             
         }    


        #region IAction Members

        public String Action()
        {
            if (body.CollisionSkin.Collisions.Count != 0)
                return COLLIDING;
            return NOT_COLLIDING;
        }

        public static readonly String COLLIDING = "Colliding";
        public static readonly String NOT_COLLIDING = "NOT_Colliding";

        #endregion
    }
}
